import http from '@/http/index'
// 所有一级分类及子分类的数据
export const selectProductTypeListApi = (): RES<any> => http.get('/productCategory/list/withChildren')
//查询所有商品属性列表
export const selectProductPropertyListApi = (): RES<any> => http.get('/productAttribute/category/list/withAttr')

//根据id查询单个商品属性
export const selectProductPropertyByIdApi = (id:any): RES<any> => http.get(`/productAttribute/${id}`)

//根据id查询商品类型的属性和列表参数
export const selectProductListPropertyByIdApi = (params:any): RES<any> =>http.get(`/productAttribute/list/${params.cid}`,{params})
// 获取商品专题
// export const getProductSubjectListApi = (): RES<any> => http.get("/mall-admin/subject/listAll")
export const getProductSubjectListApi = ():RES<any> => http.get("http://xue.cnkdl.cn:9082/mall-admin/subject/listAll")

// 获取商品优选
// export const getProductGoodSelectListApi = (): RES<any> => http.get("/mall-admin/prefrenceArea/listAll")
export const getProductGoodSelectListApi = ():RES<any> => http.get("http://xue.cnkdl.cn:9082/mall-admin/prefrenceArea/listAll")

// 获取商品品牌列表

export const getProductLogoListApi = ():RES<any> => http.get("/brand/listAll")